FROM php:8.3.9RC1-fpm-alpine3.20
RUN apk update

RUN curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s \
      gd xdebug pdo_mysql mbstring xml tokenizer session pcre openssl hash filter fileinfo dom curl ctype zip

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN rm -rf /var/cache/apk/*

RUN addgroup -g 2000 node \
    && adduser -u 2000 -G node -s /bin/sh -D node

USER node


COPY php.ini /usr/local/etc/php/conf.d/php-custom.ini

EXPOSE  9000

WORKDIR /var/www/html/mysite.local
VOLUME /var/www/html